package hotel.conexao;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author Vanderlan
 */
public class Conexao {
    
    private static final String JDBC_DRIVER = "oracle.jdbc.OracleDriver";  
    private static final String URL_CONNECTION = "jdbc:oracle:thin:@localhost:1521:XE";  
    private static final String DB_USER = "vanderlan";  
    private static final String DB_PASS = "123";  
    
    public static Connection createConnection() throws ClassNotFoundException, SQLException, IllegalAccessException {  
        Class.forName(JDBC_DRIVER); 
        return DriverManager.getConnection(URL_CONNECTION, DB_USER, DB_PASS);  
    }  
    
    public static void main(String[] args) throws IOException, ClassNotFoundException, IllegalAccessException, SQLException{
	
        Connection c = Conexao.createConnection();
    }
}
